using System;
using System.Runtime.Serialization;

namespace Libium.Core
{
	[Serializable]
	public class AlreadyExistsException : ContractException
    {
        public AlreadyExistsException()
            : base("The item already exists")
        {
        }

		public AlreadyExistsException(string message)
			: base(message)
		{
		}

		public AlreadyExistsException(string itemType, string itemName)
			: base(String.Format("{0} <{1}> already exists", itemType, itemName))
		{
		}

		internal AlreadyExistsException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
